<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>注册 生日蛋糕网上订购 生日蛋糕预订</title>
		<link rel="stylesheet" href="css/header.css" type="text/css">
		<link rel="stylesheet" href="css/zhuce.css" type="text/css">
	</head>
	<body>
		<div class="header">
		  <div class="header-nav">
		    <a class="header-logo" href="index.html">
		      <img src="img\logo.png" >
		    </a>
		    <ul class="nav-box">
		      <li><a href="index.html">首页</a> </li>
		      <li><a href="https://www.lecake.com/SH/category-5-1.html">全国送</a> </li>
		      <li><a href="firm.html">企业专区</a> </li>
		    </ul>
		 
		  <div class="right-city-user">
					<ul>
						<li><a href="index.html" id="wechat">微信小程序</a>
					<div id="shift-in">
						<img src="img/wechat.jpg"/>
					</div></li>
						<li class="city-dropdown">
						                    <div class="current-city">城市</div>
						                    <div class="city-menu">
						                        <ul>
						                            <li><a href="#">北京</a></li>
						                            <li><a href="#">上海</a></li>
						                            <li><a href="#">广州</a></li>
						                            <li><a href="#">深圳</a></li>
						                            <li><a href="#">成都</a></li>
						                            <!-- 更多城市选项 -->
						                        </ul>
						                    </div>
						                </li>
						<li><a class="header-message" href="index.html">消息</a></li>
						<li><span class="not-login">
		              <a href="login.html">登录</a>
		              							/
		              							<a href="zhuce.html">注册</a>
							</span>
						</li>
						<li><a href="index.html" class="header-cart" id="cart-count-icon">购物车</a></li>
					</ul>
		   
		 
		    
		    
		    
		  </div> </div>
		</div>
		<div class="login-background">
			<div class="container">
			    <h2>注册</h2>
			    <form id="registerForm">
			      <div class="input-group">
			        <label for="phone">手机号：</label>
			        <input type="tel" id="phone" placeholder="请输入手机号" required>
			      </div>
			
			      <div class="input-group">
			        <label for="password">密码：</label>
			        <input type="password" id="password" placeholder="请输入密码" required>
			      </div>
			
			      <div class="input-group captcha-group">
			        <label for="captcha">图片验证码：</label>
			        <input type="text" id="captcha" placeholder="请输入验证码" required>
			        <img id="captchaImage" src="generate-captcha.php" alt="验证码" onclick="reloadCaptcha()" />
			      </div>
			
			      <div class="input-group">
			        <label for="smsCode">手机号验证码：</label>
			        <input type="text" id="smsCode" placeholder="请输入验证码" required>
			        <button type="button" id="getSmsCode" onclick="sendSmsCode()">获取验证码</button>
			      </div>
			
			      <button type="submit" id="registerBtn">注册</button>
			    </form>
			  </div>
		</div>
		<script>
			// script.js
			
			// 刷新验证码
			function reloadCaptcha() {
			  const captchaImage = document.getElementById('captchaImage');
			  captchaImage.src = "generate-captcha.php?" + new Date().getTime(); // 加上时间戳来防止缓存
			}
			
			// 发送手机号验证码（模拟功能）
			function sendSmsCode() {
			  const phone = document.getElementById('phone').value;
			  if (phone) {
			    alert('验证码已发送到手机号：' + phone);
			  } else {
			    alert('请输入手机号');
			  }
			}
			
			// 表单提交
			document.getElementById('registerForm').addEventListener('submit', function(e) {
			  e.preventDefault();
			  alert('注册成功！');
			});

		</script>
		<script type="text/javascript" src="js/jquery-1.12.4(1).js" ></script>
		<script type="text/javascript" src="js/header.js"></script>
	</body>
</html>